from django.contrib import admin

from .models import User,MatchScore,MatchContestant,MatchItem

class MatchContestantAdmin(admin.ModelAdmin):
	icon = '<i class="material-icons">face</i>'
	list_display = ('id','name','academy_name','mobile','user_account')
	list_display_links = ('id','name',)
	# inlines = [MatchItemTabularInline]
	# raw_id_fields = ('match_item',)
	list_filter = ('academy_name',)
	search_fields = ('name', 'academy_name', 'mobile','id')

	# class Meta:
	# 	model = MatchContestant


class MatchScoreAdmin(admin.ModelAdmin):
	icon = '<i class="material-icons">spellcheck</i>'
	list_display = ('contestant','match_item','score')
	list_display_links = ('contestant',)
	# list_display = ('name','status',)
	list_filter = ('match_item',)

class MatchItemAdmin(admin.ModelAdmin):
	icon = '<i class="material-icons">timer</i>'
	list_display = ('name','status',)
	list_filter = ('name', 'status')

	# inlines = [MatchContestantTabularInline]
    #
	# class Meta:
	# 	model = MatchItem

# Register your models here.
admin.site.register(MatchContestant,MatchContestantAdmin)
admin.site.register(MatchScore,MatchScoreAdmin)
admin.site.register(MatchItem,MatchItemAdmin)
